<!--判断圈子ID-->
{if $id}
    {php $id=$id;}
{else}
    {php $id=$_GET['cid'];}
{/if}
{php $index = \Phpcmf\Service::M()->table('1_quan')->where('id', $id)->getRow();}
{if $fabu==1}
    {php $fabu == $fabu;}
{else}
   
	{php $quanfabushezhis = \Phpcmf\Service::M()->table('1_quan')->where('id', $id)->getRow();}
	{php $fabushezhis = dr_string2array($quanfabushezhis);}
    {php $fabu = $quanfabushezhis['fabu'];}
	
{/if}
{if $rt}
    {php $rt=$rt;}
{else}
    {php $rt = \Phpcmf\Service::M()->db->table('1_quan_cart')->where('uid', $member.uid)->where('cid', $id)->countAllResults();}
    {php $rt=$rt;}
{/if}
{if $index}
    {php $index = $index;}
{else}
    {php $index = $fabushezhis;}
{/if}
{if $_GET['m'] !='edit'}
<div class="d-yuanjiao-10 d-kuan d-beijing-e3 d-bianhua-10">
	{if $_GET['leixing']}
	<div class="row ">
		<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
			<button  data-id="{$id}" type="button" class="btn btn-default col-md-12" id="fanhuiquanzi">
				<i class="bi bi-chat d-you-3"></i> 返回圈子
			</button>
			
		</div>
	</div>
	{/if}
	{if $price > 0}
		{if $member.uid == $uid && !$_GET['leixing']}
		<div class="row ">
			{php $jianjie = dr_strcut($description, 18);}
			<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
				<button onclick="javascript:dr_add_son_fabu_tiezi({$id},'{$jianjie}','{$title}');" type="button" class="btn btn-default col-md-12">
					{if $quantiezitu}<img src="{dr_thumb($quantiezitu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-chat d-you-3"></i>{/if} {if $quantieziname} {$quantieziname}{else} 发帖子{/if}
				</button>
				{if $member.is_admin}
				<!--button onclick="javascript:dr_add_son_fabu({$id});" type="button" class="btn btn-default col-md-6">
					{if $quanwenzhangtu}<img src="{dr_thumb($quanwenzhangtu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-journal-text d-you-3"></i>{/if} {if $quanwenzhangname} {$quanwenzhangname}{else} 发文章{/if}
				</button-->
				{/if}
			</div>
		</div>
		{else}
			{if $member && \Phpcmf\Service::M('buy', MOD_DIR)->is_buy($member.uid, $id) && !$_GET['leixing']}
	
				{if $daoqi['endtime'] < time()}
					{if $fabu == 1}
					<div class="row ">
						{php $jianjie = dr_strcut($description, 18);}
						<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
							<button onclick="javascript:dr_add_son_fabu_tiezi({$id},'{$jianjie}','{$title}');" type="button" class="btn btn-default col-md-12">
								{if $quantiezitu}<img src="{dr_thumb($quantiezitu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-chat d-you-3"></i>{/if} {if $quantieziname} {$quantieziname}{else} 发帖子{/if}
							</button>
							{if $member.is_admin}
							<!--button onclick="javascript:dr_add_son_fabu({$id});" type="button" class="btn btn-default col-md-6">
								{if $quanwenzhangtu}<img src="{dr_thumb($quanwenzhangtu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-journal-text d-you-3"></i>{/if} {if $quanwenzhangname} {$quanwenzhangname}{else} 发文章{/if}
							</button-->
							{/if}
						</div>
					</div>
					{else}
						{if $uid == $member.uid}
							<div class="row">
								{php $jianjie = dr_strcut($description, 18);}
								<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
									<button onclick="javascript:dr_add_son_fabu_tiezi({$id},'{$jianjie}','{$title}');" type="button" class="btn btn-default col-md-12">
										{if $quantiezitu}<img src="{dr_thumb($quantiezitu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-chat d-you-3"></i>{/if} {if $quantieziname} {$quantieziname}{else} 发帖子{/if}
									</button>
									{if $member.is_admin}
									<!--button onclick="javascript:dr_add_son_fabu({$id});" type="button" class="btn btn-default col-md-6">
										{if $quanwenzhangtu}<img src="{dr_thumb($quanwenzhangtu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-journal-text d-you-3"></i>{/if} {if $quanwenzhangname} {$quanwenzhangname}{else} 发文章{/if}
									</button-->
									{/if}
								</div>
							</div>
						{/if}
					{/if}
				{else}
					{if $fabu == 1}
					<div class="row">
						{php $jianjie = dr_strcut($description, 18);}
						<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
							<button onclick="javascript:dr_add_son_fabu_tiezi({$id},'{$jianjie}','{$title}');" type="button" class="btn btn-default col-md-12">
								{if $quantiezitu}<img src="{dr_thumb($quantiezitu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-chat d-you-3"></i>{/if} {if $quantieziname} {$quantieziname}{else} 发帖子{/if}
							</button>
							{if $member.is_admin}
							<!--button onclick="javascript:dr_add_son_fabu({$id});" type="button" class="btn btn-default col-md-6">
								{if $quanwenzhangtu}<img src="{dr_thumb($quanwenzhangtu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-journal-text d-you-3"></i>{/if} {if $quanwenzhangname} {$quanwenzhangname}{else} 发文章{/if}
							</button-->
							{/if}
						</div>
					</div>
					{else}
						{if $uid == $member.uid}
							<div class="row ">
								{php $jianjie = dr_strcut($description, 18);}
								<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
									<button onclick="javascript:dr_add_son_fabu_tiezi({$id},'{$jianjie}','{$title}');" type="button" class="btn btn-default col-md-12">
										{if $quantiezitu}<img src="{dr_thumb($quantiezitu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-chat d-you-3"></i>{/if} {if $quantieziname} {$quantieziname}{else} 发帖子{/if}
									</button>
									{if $member.is_admin}
									<!--button onclick="javascript:dr_add_son_fabu({$id});" type="button" class="btn btn-default col-md-6">
										{if $quanwenzhangtu}<img src="{dr_thumb($quanwenzhangtu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-journal-text d-you-3"></i>{/if} {if $quanwenzhangname} {$quanwenzhangname}{else} 发文章{/if}
									</button-->
									{/if}
								</div>
							</div>
						{/if}
					{/if}
				{/if}
	
			{else}
				
			{/if}
	
		{/if}
	{else}
		{if $fabu == 1 && !$_GET['leixing']}
		<!--div class="d-kuan d-hanggao-50 d-yuanjiao-10 d-wenzi-juzhong d-quxian-0 d-xia-15 d-zitiyanse-bai" style="background-color: {if $beijingyanse}{$beijingyanse}{else}#58b87e{/if}">
			<a href="/index.php?s=member&app={MOD_DIR}&c=son&m=add&tid=&cid={$id}" class="d-jiacu d-wenzi-16">发 帖</a>
		</div-->
		<div class="row ">
			{php $jianjie = dr_strcut($description, 18);}
			<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
				<button onclick="javascript:dr_add_son_fabu_tiezi({$id},'{$jianjie}','{$title}');" type="button" class="btn btn-default col-md-12">
					{if $quantiezitu}<img src="{dr_thumb($quantiezitu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-chat d-you-3"></i>{/if} {if $quantieziname} {$quantieziname}{else} 发帖子{/if}
				</button>
				{if $member.is_admin}
				<!--button onclick="javascript:dr_add_son_fabu({$id});" type="button" class="btn btn-default col-md-6">
					{if $quanwenzhangtu}<img src="{dr_thumb($quanwenzhangtu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-journal-text d-you-3"></i>{/if} {if $quanwenzhangname} {$quanwenzhangname}{else} 发文章{/if}
				</button-->
				{/if}
			</div>
		</div>
		{else}
			{if $uid == $member.uid  || d_guanlizuming($id,$member.uid) && !$_GET['leixing']}
				<div class="row ">
					{php $jianjie = dr_strcut($description, 18);}
					<div class="btn-group btn-group-lg col-md-12" role="group" aria-label="...">
						<button onclick="javascript:dr_add_son_fabu_tiezi({$id},'{$jianjie}','{$title}');" type="button" class="btn btn-default col-md-12">
							{if $quantiezitu}<img src="{dr_thumb($quantiezitu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-chat d-you-3"></i>{/if} {if $quantieziname} {$quantieziname}{else} 发帖子{/if}
						</button>
						{if $member.is_admin}
						<!--button onclick="javascript:dr_add_son_fabu({$id});" type="button" class="btn btn-default col-md-6">
							{if $quanwenzhangtu}<img src="{dr_thumb($quanwenzhangtu)}" width="20" height="20" class="d-you-3">{else}<i class="bi bi-journal-text d-you-3"></i>{/if} {if $quanwenzhangname} {$quanwenzhangname}{else} 发文章{/if}
						</button-->
						{/if}
						</div>
						
				</div>
			{/if}
		{/if}
	{/if}
	{php $isbiao = \Phpcmf\Service::M()->db->tableExists(\Phpcmf\Service::M()->dbprefix('1_quan_shezhi'));}
	{if $isbiao}
	{php $kaiguan = \Phpcmf\Service::M()->table('1_quan_shezhi')->where('dirname', 'quan')->getRow();}
	{/if}
	{php $quanzhukaiguan = \Phpcmf\Service::M()->table('1_quan')->where('uid', $member.id)->where('id', $id)->getRow();}
	{php $quanfabushezhi = \Phpcmf\Service::M()->table('1_quan')->where('id', $id)->getRow();}
	{php $kaiguans = dr_string2array($kaiguan['setting']);}
	{php $quanzhukaiguans = dr_string2array($quanzhukaiguan);}
	{php $fabushezhis = dr_string2array($quanfabushezhi['fabushezhi']);}
	
	{php $yonghuzufabuquanxian = \Phpcmf\Service::M()->table('1_quan_form_group')->where('uid', $member.id)->where('quanid', $id)->getRow();}
	{php $yonghuzufabuquanxian = dr_string2array($yonghuzufabuquanxian);}
	
	{php $yonghuzufabuquanxians = \Phpcmf\Service::M()->table('1_quan_form_yonghuzu')->where('id', $yonghuzufabuquanxian['gid'])->where('cid', $id)->getRow();}
	{php $yonghuzufabuquanxians = dr_string2array($yonghuzufabuquanxians);}
	
	{php $duliquanzishezhidata = \Phpcmf\Service::M()->table('1_quan')->where('id', $id)->getRow();}
	{php $duliquanzishezhi = dr_string2array($duliquanzishezhidata['fabushezhi']);}
	<div class="row ">
		
		{if $fabu == 1}
			{template "fabu-wenzhang.html","/"}
			{template "fabu-tuji.html","/"}
			{template "fabu-shipin.html","/"}
			{template "fabu-mpsan.html","/"}
			{template "fabu-yuyin.html","/"}
			{template "fabu-toupiao.html","/"}
			{template "fabu-fufei.html","/"}
			{template "fabu-wenda.html","/"}
			{template "fabu-shangpin.html","/"}
			{template "fabu-bisai.html","/"}
			{template "fabu-xiazai.html","/"}
			{template "fabu-pk.html","/"}
			{template "fabu-huodong.html","/"}
			{template "fabu-chuzu.html","/"}
			{template "fabu-qiuzu.html","/"}
			{template "fabu-zhaopin.html","/"}
			{template "fabu-qiuzhi.html","/"}
			{if dr_is_app('chuangyejin')}
				<!--创业金-->
				{template "fabu-chuangyejin.html","/"}
			{/if}
		{else}
		    {$description}
		{/if}
		
	</div>
</div>

{/if}
<style>
	.btn-default {
	    color: #333;
	    background-color: #fff;
	    border-color: #fff;
	}
	.btn-default {
	    color: #333;
	    background-color: #e7ebf1;
	    border-color: #e7ebf1;
	}
</style>
<script>
	$(document).ready(function() {
	    
	});
	$('#fanhuiquanzi').on('click', function() {
	    var id = $(this).data('id'); // 从数据属性中获取id  
	    var url = "{dr_url('quan/show/index')}&id=" + id; // 构建URL  
	    window.location.href = url; // 执行页面跳转。
	}); 
</script>